<template>
	<view>
		<u-navbar back-text="返回" title="完本小说"></u-navbar>
		<!-- 书籍种类 -->
		<u-grid :col="3">
			<u-grid-item  v-for="(item,index) in types" :index="item.index" :key="index" @click="to(item)">
				<u-icon name="photo" :size="46"></u-icon>
				<view class="grid-text">{{item.name}}</view>
			</u-grid-item>
		</u-grid>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				types: [{
					name: '玄幻小说',
					index: 1
				}, {
					name: '修真小说',
					index: 2
				}, {
					name: '都市小说',
					index: 3
				}, {
					name: '历史小说',
					index: 4
				}, {
					name: '网游小说',
					index: 5
				}, {
					name: '科幻小说',
					index: 6
				}, {
					name: '言情小说',
					index: 7
				}],
				mode: 'nav',
				listData: [],
				key: '',
			}
		},
		methods: {
			to(type){
				uni.navigateTo({
					url: '/pages/sousuo/bookft?index='+type.index+'&name='+type.name
				});
			}
		},
		onLoad() {
			
		}
	}
</script>

<style scoped lang="scss">
	.grid-text {
		font-size: 28rpx;
		margin-top: 4rpx;
		color: $u-type-info;
	}
</style>
